package com.xcc.commandpattern.demo02;

/**
 * @Description: StereoOffCommand
 * @Author xiechuang
 * @Date 2022/9/8
 */
public class StereoOffCommand implements Command {

    Stereo stereo;

    public StereoOffCommand(Stereo stereo) {
        this.stereo = stereo;
    }

    @Override
    public void execute() {
        stereo.off();
    }

    @Override
    public void undo() {
        stereo.on();
    }

}
